﻿using System;

namespace ResponsibilityChain
{
    internal class Program
    {
        static void Main(string[] args)
        {
            PurchRequest purchRequest = new PurchRequest(1, 3000);

            DepartmentApprove departmentApprove = new DepartmentApprove("department zhang");
            CollegeApprove collegeApprove = new CollegeApprove("college li");
            ViceSchoolMasterApprove viceSchoolMasterApprove = new ViceSchoolMasterApprove("vice school master wang");
            SchoolMasterApprove schoolMasterApprove = new SchoolMasterApprove("school master zhao");

            departmentApprove.SetNext(collegeApprove);
            collegeApprove.SetNext(viceSchoolMasterApprove);
            viceSchoolMasterApprove.SetNext(schoolMasterApprove);

            departmentApprove.ProcessRequest(purchRequest);
        }
    }
}
